Repository navigation
Conversation
Brings the xgen packages of codegen-x/ui8kit (main 18d9e650) into ui8kit/codegen: schema (JSON Schemas, Codex manifest and block data, @ui8kit/contract v0.4 validation), spec (loader and canonical renderer), screens (view IR builder, authoring of organisms, blocks, presets and screens), generator, check, cli and the runtimes svelte, react, vue, solid, templ, twig, jinja2, latte; plus rules/, packages/tooling, the ui8px policy and the root Bun workspace. Standalone changes: the Go module is github.com/ui8kit/codegen/packages/templ/ui; the taste-data copy-deck target and the magazine style zone apply only when those packages exist; blocks.json regenerated without the monorepo-only surfaces; tests read the workspace instead of assuming apps/magazine; the 0.1 engine (bricks/, src/, runtime/, generated/, examples/, tests/) is removed (still at 972b492 on main). Version 2.0.0 (not published); LICENSE holder UI8Kit.
packages/{svelte,react,vue,solid}/ui, packages/{templ,twig,jinja2,latte}/ui,
packages/shared/app and apps/host-{svelte,react,vue,solid}, written by xgen build
from xgen/specs (DO NOT EDIT; the drift group of xgen check keeps them equal to the
regeneration). Go module github.com/ui8kit/codegen/packages/templ/ui.
ui.themetoggle (ThemeToggle) and ui.sheet (Sheet, SheetTrigger, SheetClose), imported with spec/tools/import-codegen.ts from saas-design packages/ui/bricks (the 0.1 brick DSL) and turned into token-only xgen specs: the semantic ui-* classes of the saas-design adapter are replaced by the utilities they applied (sun/moon by dark:, the trigger icons by in-aria-expanded:), rounded-full -> rounded (one corner token), the sheet panel shadow-xl -> shadow-lg (allowlisted: a floating layer). Same DOM, ARIA and data-ui8kit hooks as saas-design; Lucide sun, moon, menu and x glyphs inline. Examples cover every variant and size; generated for all eight runtimes and checked by templ, solid, twig, jinja2 and latte parity. 40 bricks, 72 parts.
The upstream 0.1 bricks used gap-1.5 (button sm, card header), which saas-design snapped to gap-2 in packages/ui/scripts/registry.ts (backlog codegen-half-steps.md). The xgen specs are already on the grid (button sm h-8 px-3, card header gap-2); the spacing group of xgen check now fails on any fractional step (gap-1.5, px-2.5, size-3.5, -mt-0.5 ...) in xgen/specs, xgen/screens/src and the runtime assets, so the SNAP workaround is no longer needed. Test: check/test/half-steps.test.ts.
…of xgen-schema bun run verify = xgen check + codex:validate (every Codex v0.4 fixture through validateCollectionV04 of @ui8kit/contract) + typecheck:xgen + bun test xgen. @ui8kit/contract ^0.2.0 moves from devDependencies to dependencies: codex-validate.ts imports it outside tests.
README presents the 2.0 surface (8 runtimes, counts, quick start, layout, design rules, Codex contract) aligned with the public registry ui.buildy.tw / ui8kit CLI 2.0.x. docs/: architecture, runtimes, cli, contract, registry (how ui8kit/site could build its registry from this repository instead of the private monorepo), specs-guide. MIGRATION.md: what changed from 0.1, the engine API mapping, recipe/DOM changes, and the steps for saas-design (local ThemeToggle/Sheet bricks upstream, SNAP removal, templ v0.3.1070, open items). xgen READMEs note the monorepo-only surfaces.
…ify runs the full typecheck
- themetoggle/sheet: drop focusable="false" from the inline Lucide SVGs (not an SVG
attribute in Solid's JSX types; aria-hidden already hides the glyphs), so
tsc -p packages/solid/ui passes.
- svelte emitter: an anchor whose href arrives through {...rest} and carries a tabindex
gets <!-- svelte-ignore a11y_no_noninteractive_tabindex --> (Link, LinkPlain): the
saas-design backlog item codegen-svelte-link-a11y-tabindex; svelte-check now reports
0 errors and 0 warnings for @ui8kit/svelte-ui and host-svelte.
- bun run verify = check + codex:validate + typecheck (xgen tsc, svelte-check, tsc,
vue-tsc on the packages, the shared app and the hosts) + test.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Ports the xgen generation layer of ui8kit 2.0 from
codegen-x/ui8kit(main@18d9e650, folder/xgen) intoui8kit/codegenas a standalone Bun workspace, and bumps the package to 2.0.0 (not published to npm). The 0.1 engine is replaced; it stays reachable at972b492(the SHA saas-design pins).What is ported
xgen/):@ui8kit/xgen-schema(JSON Schemas, Codex manifest,codex/blocks.json,@ui8kit/contractv0.4 validation),xgen-spec(brick loader, canonical renderer, 0.1 importer),xgen-screens(view IR + builder of parts, patterns, organisms, blocks, presets, screens),xgen-generator,xgen-check,xgenCLI, and the runtimes svelte, react, vue, solid, templ, twig, latte, jinja2 (+runtimes/core).bun run build, DO NOT EDIT, drift-checked):packages/{svelte,react,vue,solid}/ui,packages/{templ,twig,jinja2,latte}/ui,packages/shared/app,apps/host-{svelte,react,vue,solid}.rules/(zones, baselines, self-test fixtures, html-validate),packages/tooling(rules, zones, ui8px gate, pre-push audit),.ui8pxpolicy,.githooks/pre-push, CI (bun run verifywith Go, PHP 8.4 + composer and Python 3.13;UI8KIT_REQUIRE_ALL_RUNTIMES=1).docs/(architecture, runtimes, cli, contract, registry, specs-guide),MIGRATION.md(0.1 -> 2.0, with the saas-design steps).Standalone changes vs the monorepo
github.com/ui8kit/codegen/packages/templ/ui(wasgithub.com/codegen-x/ui8kit/...).packages/taste-data), the magazine style zone;codex/blocks.jsonregenerated without the magazine/taste surfaces; tests read the workspace instead of assumingapps/magazine.@ui8kit/contractis a runtime dependency ofxgen-schema;verifyalso runscodex:validateand the full typecheck.Upstreamed from saas-design
ui.themetoggle) and Sheet (ui.sheet:Sheet,SheetTrigger,SheetClose) bricks, imported fromsaas-design/packages/ui/brickswithspec/tools/import-codegen.ts, token-only (semanticui-*classes replaced by the utilities they applied), same DOM/ARIA/data-ui8kithooks, generated for all 8 runtimes and parity-checked.gap-1.5in Button sm and CardHeader is gone); newspacinggate + test fail on anyx.5step in specs, builder or kit assets, so saas-design'sSNAPmap is no longer needed.a11y_no_noninteractive_tabindexwarning silenced in the emitter (svelte-check: 0 errors, 0 warnings).Breaking changes (details in MIGRATION.md)
bricks/*.def.tsDSL ->xgen/specs/ui/*.json; deep importsbricks/index,bricks/_dsl,src/domain/validate,src/emitters/*,tests/support/*are gone (useloadSpecs,planBuild/write, the@ui8kit/xgen-runtime-*emitters).generated/ui/<brick>/-> one package per runtime; kebab-case file names; templ v0.3.1001 -> v0.3.1070; Go module path changed.h-8/h-10/h-12, one corner tokenrounded, no shadows on flat surfaces, Buttonlayoutaxis replaces sizeicon.examples/, static HTML export,generate:latte-bundle.Verify results (local, Bun 1.4.2, Go, PHP 8.4.26, Python 3.13.5,
UI8KIT_REQUIRE_ALL_RUNTIMES=1)bun run check: xgen check: ok, all 31 groups. Parity: templ, solid, twig, jinja2, latte each 123 brick cases + 474 block cases (224 organisms) render the same DOM as React; 474 documents pass html-validate per runtime.bun run codex:validate: 733 entries, 8 menus (63 items), 62 kinds, 4 taxonomies: 0 errors, 0 warnings.bun run typecheck: xgen tsc ok; svelte-check (svelte-ui, host-svelte) 0 errors, 0 warnings; tsc / vue-tsc on react, solid, vue, shared app and hosts ok.bun test xgen: 821 pass, 0 fail (18,481 expects, 34 files).audit:push: ok (no private files, binaries or secrets).bun run e2e/visual(Playwright browsers),build:hosts.Registry / site
ui8kit/site (
registry/, ui.buildy.tw, registry.buildy.tw) builds from a--srccheckout with exactly this layout (packages/*/ui,packages/shared/app,xgen/specs,xgen/screens/src/authoring/screens/themes.ts,apps/host-*/xgen/screens). It can later build fromui8kit/codegeninstead of the private monorepo:bun run registry:build -- --src ../codegen(seedocs/registry.md). Expected difference: +2 primitives (themetoggle, sheet).Left out (monorepo internals)
apps/magazine,apps/discovery,packages/panorama,packages/taste-data,packages/taste-screens,plan/,.cursor/, shots.